// JavaScript Document
var sId = "";
var sTime = ""
var sTemp = ""
var pullit = ""
var drawit = ""
function Door(id,left,time,temp){
	sId = id;
	sTime = time
	sTemp = temp
	if(document.all){
		themenu = document.getElementById(sId).style
		rightboundary = 0
		leftboundary = left
	}else{
		themenu = document.layers.slidemenubar
		rightboundary = left
		leftboundary = 10
	}
	document.getElementById(sId).onmouseover = pull;
	document.getElementById(sId).onmouseout = draw;
}
	
function pull(){
	document.getElementById(sId).focus();
	if(window.drawit){
		clearInterval(drawit)
	}
	pullit = setInterval("pullengine()",sTime)
}

function draw(){
	clearInterval(pullit)
	drawit = setInterval("drawengine()",sTime)
}

function pullengine(){
	if(document.all && themenu.pixelLeft < rightboundary){
		themenu.pixelLeft += sTemp
	}else if(document.layers && themenu.left < rightboundary){
		themenu.left += sTemp
	}else if(window.pullit){
		clearInterval(pullit)
	}
}

function drawengine(){
	if(document.all && themenu.pixelLeft > leftboundary){
		themenu.pixelLeft -= sTemp
	}else if(document.layers && themenu.left > leftboundary){
		themenu.left -= sTemp
	}else if(window.drawit){
		clearInterval(drawit)
	}
}